<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="container"></div>
<input type="file" multiple onchange="fileChange(this.files)">
<script>
    function fileChange([file]) {
        const img = createImage2(file);
        const containerDom = document.getElementById('container');
        containerDom.appendChild(img);
    }

    function createImage(file) {
        const url = window.URL.createObjectURL(file);
        const img = document.createElement('img');
        img.src = url;
        img.height = 60;
        img.onload = function () {
            window.URL.revokeObjectURL(url);
        }
        return img;
    }

    function createImage2(file) {
        const img = document.createElement('img');
        const fileReader = new FileReader();
        fileReader.readAsDataURL(file);
        fileReader.onload = function (e) {
            img.src = e.target.result;
            img.height = 160;
        }
        return img;
    }
</script>
</body>
</html>